package common.tool.pinying;


import com.tekj.cxqcb.operation.resultBean.GetCarBrandAndModelBean;

import java.util.Comparator;


public class PinyinComparatorBrand implements Comparator<GetCarBrandAndModelBean.DataBean.BrandListBean> {

    public int compare(GetCarBrandAndModelBean.DataBean.BrandListBean o1, GetCarBrandAndModelBean.DataBean.BrandListBean o2) {
        if (o1.getLetters().equals("@")
                || o2.getLetters().equals("#")) {
            return 1;
        } else if (o1.getLetters().equals("#")
                || o2.getLetters().equals("@")) {
            return -1;
        } else {
            return o1.getLetters().compareTo(o2.getLetters());
        }
    }

}
